/*jslint browser: true, devel: true, bitwise: true, white: true, plusplus: true */
/*global $:true, define:true */

/**
 * @module UI
 */

define(['WID/UI/Widget'],function(Widget) {
"use strict";

/** 
 * Button type checkbox.
 * @class Checkbox
 * @constructor
 * @param {Object} props Parameters. See also in {{#crossLink "Widget"}}{{/crossLink}}
 *  @param {Boolean} [props.checked] If true this button is checked.
 */
function Checkbox(props) {
	props = props||{};
	Widget.call(this,props,'input');
	this.ntv.type = 'checkbox';
	
	this.checked = props.checked;
	
} var extend = Object.create(Widget.prototype); extend.constructor = Checkbox;

Widget.defineProps(extend,{
	checked: {
		get: function() {
			return this.ntv.checked;
		},
		set: function(checked) {
			this.ntv.checked = checked||'';
		}
	}
});

Checkbox.prototype = extend;
return Checkbox;
});
